package com.mxp.influx.client.entity.api;

/**
 * @author maoxp
 * @date 2024-12-23 11:25
 */
public class ApiController {
    public R success(Object data) {
        R r = new R();
        r.setStatus(true);
        r.setData(data);
        return r;
    }
    public R success(Object data, String mag) {
        R r = new R();
        r.setStatus(true);
        r.setData(data);
        r.setMsg(mag);
        return r;
    }
    public R error(String msg) {
        R r = new R();
        r.setStatus(false);
        r.setMsg(msg);
        return r;
    }
}
